// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false

//将vueRouter注册为vue的插件
import VueRouter from "vue-router"
Vue.use(VueRouter)

//拿三个组件
import A from "./components/A"
import B from "./components/B"
import C from "./components/C"
//定义路由
const routes = [
  {path:"/A",component:A},
  {path:"/B",component:B},
  {path:"/C",component:C}
]
//注册路由
const router = new VueRouter({
  routes:routes
})
//注册路由器
/* eslint-disable no-new */
new Vue({
  el: '#app',
  components: { App },
  template: '<App/>',
  router:router
})
